package com.lagou.analysis.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.lagou.analysis.entity.Position;
import com.lagou.analysis.mapper.PositionMapper;
import com.lagou.analysis.service.PositionService;
import com.lagou.analysis.service.vo.*;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PositionServiceImpl extends ServiceImpl<PositionMapper,Position> implements PositionService {

    @Override
    public Page<PositionVO> getPositionList(Integer pageNumber, Integer pageSize) {
        Page page = new Page(pageNumber,pageSize);
        List<Position> positionVOList = baseMapper.findPositionListByPage(page);
        page.setRecords(positionVOList);
        return page;
    }

    @Override
    public List<DistrictVO> getDistrictRation() {
        return baseMapper.findDistrictRation();
    }

    @Override
    public List<WorkYearVO> getWorkYearRatio() {
        return baseMapper.findWorkYearRatio();
    }

    @Override
    public List<FinanceStageVO> getFinanceStage() {
        return baseMapper.findFinanceStage();
    }

    @Override
    public List<SalaryVO> getSalary() {
        return baseMapper.findSalary();
    }
}
